package com.trip.driver.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.trip.common.dto.DriverOrderSearchDto;
import com.trip.common.dto.LoginDto;
import com.trip.common.dto.UpdateDriverDto;
import com.trip.common.entity.Driver;
import com.trip.common.po.Comment;
import com.trip.common.po.OrderInfo;
import com.trip.common.po.TripOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hr
 * @since 2024-09-05
 */
@Mapper
@Repository
public interface DriverMapper extends BaseMapper<Driver> {
    Driver loginByAccount(LoginDto loginDto);
    Driver loginByEmail(LoginDto loginDto);
    BigDecimal getMyMoney(String driver_id);
    String getMyDistance(@Param("driver_id") String driver_id,@Param("date")  String date);
    String getMyOrderNum(@Param("driver_id") String driver_id,@Param("date")  String date);
    String getToDayPrice(@Param("driver_id") String driver_id,@Param("date")  String date);
    List<TripOrder> getMyOrderDetail(DriverOrderSearchDto driverOrderSearchDto);
    TripOrder getOrderDetailByID(String order_id);
    Driver getDriverInfo(String driver_id);
    List<Comment> getCommentByID(String driver_id);
    int updateDriverInfo(UpdateDriverDto updateDriverDto);
    int resetPWD(UpdateDriverDto updateDriverDto);
}
